﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common.Logging;
using WuDada.Core.Post;
using WuDada.Core.Post.Service;
using WuDada.Core.Post.Domain;

public partial class success_in : System.Web.UI.Page
{
    private ILog m_Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
    private PostFactory m_PostFactory;
    private IPostService m_PostService;

    protected void Page_Load(object sender, EventArgs e)
    {
        m_PostFactory = new PostFactory();
        m_PostService = m_PostFactory.GetPostService();

        if (!IsPostBack)
        {
            LodaDataToUI();
        }
    }

    private void LodaDataToUI()
    {
        int id = QueryStringHelper.GetInteger("id", 0);
        PostVO postVO = m_PostService.GetPostById(id);

        if (postVO != null)
        {
            ltlTitle.Text = postVO.Title;
            ltlHtmlContent.Text = postVO.HtmlContent;
        }
    }
}